package com.missyoubug.easyjtest.util;

import java.io.Serializable;

public class Message<D> implements Serializable {

    private static final long seriaVersionUID = 1L;
    private Result result;
    private int code;
    private String message;
    private D data;


    public Message() {

    }

    public Message(Result result, int code) {
        this.result = result;
        this.code = code;
    }

    public Message(Result result, Integer code, String message) {
        this.result = result;
        this.code = code;
        this.message = message;
    }

    public Message(Result result, Integer code, String message, D data) {
        this.result = result;
        this.code = code;
        this.message = message;
        this.data = data;
    }

    public Message(Result result, D data) {
        this.result = result;
        this.data = data;
    }

    public Message(Result result, int code, D data) {
        this.result = result;
        this.code = code;
        this.data = data;
    }

    public static long getSeriaVersionUID() {
        return seriaVersionUID;
    }

    public Result getResult() {
        return result;
    }

    public void setResult(Result result) {
        this.result = result;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public D getData() {
        return data;
    }

    public void setData(D data) {
        this.data = data;
    }
}
